package com.gientech.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author：yihao.long
 * @Package：com.gientech.controller
 * @Project：spring-cloud-transaction-rocketmq
 * @name：DemoController
 * @Date：2024/4/2 9:05
 * @Filename：DemoController
 * @Describer: 写好类注释，描述类作用以及使用场景
 */
@RestController
@RequestMapping(value = "/demo")
@RefreshScope
public class DemoController {

    @Value("${userName}")
    private String name;

    @GetMapping("/getValue")
    public String getNacosConfigAttr(){
        return name;
    }
}
